<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<%@ include file="/WEB-INF/views/shared/master/contentHeader.jsp"%>
<style>
	body{
		font-size:9px ;
		font-family:黑体,微软雅黑;
	}
	.table{
		border:black 1px solid !important;
	}
	.table tr th{
		border:black 1px solid !important;
		text-align: center;
		padding:0px 2px !important;
	}
	.table tr td{	
		border:black 1px solid !important;
		padding:0px 2px !important;
		text-align: center;
	}
</style>
<script type="text/javascript">
	function paceDoneCallback(){
		window.print();
		//top.main.formSubmit();
		top.$("#modal_inStock_form").modal("hide");
	}
</script>
<div id="printContent" >
	
		<div class="text-center"><h5>${shop.shopName }采购退货单</h5></div>
	
	    <label  style="font-size:1.2em;margin-left:20px">采购退货单号 : ${inStock.inStockNo }</label>
		<table class="cntable table table-bordered  " >
					<thead>
						<tr class="success" >
								
							<th>序号</th>
							
							<th>商品编码</th>
							<th>商品名称</th>
							<th>规格</th>
							<th>单位</th>
							
							<th>退货数</th>
							<th>退货单价(元)</th>
							<th>小计(元)</th>
						</tr>
					</thead>
					<tbody >
						<c:forEach var="inStockShow" items="${inStock.inStockShows}" varStatus="status">
						
						<c:forEach var="inStockCollocation" items="${inStockShow.inStockCollocations}" varStatus="status">
							<tr  >
							
								<td name="index"></td>
								
								<td>${inStockShow.cargo.cargoNo }</td>
								<td>${inStockShow.cargo.cargoName}</td>
								<td>${inStockCollocation.collocation.propertyNameOne }*${inStockCollocation.collocation.propertyNameTwo }</td>
								<td></td>
								
								<td>${inStockCollocation.collocationNum}</td>
								<td>${inStockCollocation.realPrice}</td>
								<td>${inStockCollocation.collocationNum*inStockCollocation.realPrice}</td>
							</tr>
						</c:forEach>
					</c:forEach>
						<tr  >
							<td rowspan="2" colspan="6"></td>
							<td>合计：</td>
							<td>${inStock.returnMoney }</td>
						</tr>
						<tr  >							
							<td>应付金额：</td>
							<td style="color:red">${inStock.returnMoney }</td>
						</tr>
					</tbody>
			
				</table>     
				 <div class="row" style="margin-top:6px;margin-left:5px">
					<div style="float:left;"><span style="padding-left:10px;">供应商:${inStock.supplier.supplierName}</span></div>
					<div style="float:left;margin-left:50px;"><span style="padding-left:10px;">经办人:${inStock.operatorName }</span></div>
					<div style="float:left;margin-left:50px;"><span style="padding-right:35px;">退货仓库:${inStock.warehouse}</span></div>
					<div style="float:left;margin-left:50px;"><span style="padding-right:35px;">退货日期: <fmt:formatDate value="${inStock.purchase.createDate}" type="date" dateStyle="default" pattern="YY-MM-dd HH:mm"/></span></div>
				</div>
		
				<div class="row"  style="margin-top:6px;margin-left:5px">
					<div style="float:left"><span style="padding-left:10px;">备注：${inStock.comment }</span></div>
				</div>
				<div class="row"  style="margin-top:6px;margin-left:5px;margin-bottom:20px">
					<div style="float:left;"><span style="padding-left:10px;">制单人：${inStock.createUserName }</span></div>
				</div> 
</div>
<script type="text/javascript">
$(function() {
	
	var index=1;
	$("td[name='index']").each(function(){
		$(this).html(index);	
		index++;
	});

});
</script>
<%request.setAttribute("noScripts","formpickers.location;"); %>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formvalidations.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/notifications.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/ui/moment.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/contentFooter.jsp"%>
